package com.lxl.xm.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.lxl.xm.common.DailyEarning;
import com.lxl.xm.model.entity.Revenue;
import com.lxl.xm.model.enums.AdTypeEnum;
import com.lxl.xm.model.vo.RevenueVO;

import java.util.List;

public interface RevenueService extends IService<Revenue> {
    double calculatePlacementRevenue(AdTypeEnum adtype, int duration);

    double calculateDiscountedRevenue(double baseRevenue,int duration);

    double calculatePerformanceRevenue(long adCampaignId,double cpm,double cpc);
    //List<DailyEarning> getRevenueDataOfLastSevenDays();

    boolean createRevenue(Revenue revenue);

    Revenue getRevenueById(Long id);

    boolean updateRevenue(Revenue revenue);

    boolean deleteRevenue(Long id);

    Revenue createOrUpdateRevenue(RevenueVO revenueVO);
}
